import http from '@/utils/http';


/**
 * 删除区域信息
 * @param params
 * @returns {*|Promise<any>}
 */
export const removeSeal = (params: any) => {
  return http.delete('bus/seal/remove', {params});
}

/**
 * 获取系统用户列表
 * @param params
 * @returns {*|Promise<any>}
 */
export const getSealList = (params?: any) => {
  return http.get('bus/seal/list', {params});
}

/**
 * 保存修改区域信息
 * @param params
 * @returns {*|Promise<any>}
 */
export const updateSeal = (params: any) => {
  return http.put('bus/seal/edit', params);
}

/**
 * 保存新增区域信息
 * @param params
 * @returns {*|Promise<any>}
 */
export const addSeal = (params: any) => {
  return http.post('bus/seal/add',params);
}

/**
 * 通过id获取区域信息
 * @param params
 * @returns {*|Promise<any>}
 */
export const getSealById = (params: any) => {
  return http.get('bus/seal/' + params.id);
}

/**
 * 验证区域名称是否唯一
 * @param params
 * @returns {*|Promise<any>}
 */
export const checkSealNameUnique = (params: any) => {
  params.loading = false;
  return http.post('bus/seal/checkNameUnique', params);
}


